﻿

(function ($) {
    $(function () {
        $(".slides").carouFredSel({
            circular: true,
            auto    : true,
            //pagination  : "#foo2_pag",
            height: 300,
            items: {
                height: 300,
                visible: {
                    min: 1,
                    max: 1
                }
            },
            scroll: {
                items : 1,
                duration  : 1000,
                fx: 'crossfade',
            }
        });

        $('#content-box-tabs li ul').hide();
        $('#content-box-tabs li').click(
		    function () {
		        $(this).find('ul.managerOption').slideToggle('normal');
                $('#content-box-tabs li').removeClass('current');
                $(this).addClass('current').fadeIn();
                $('#content-box-tabs li.current').siblings().find('ul.managerOption').slideUp('normal');
		        return false;
		    }
	    );
        $('#content-box-tabs ul li').click(
		    function () {
		        $('#content-box-tabs ul li').removeClass('current');
		        $(this).addClass('current');
		        return false;
		    }
	    );

        $(function () {
            var url = window.location.href;
            if (window.location.hash) {
                url = window.location.href.substr(0, url.indexOf('#'));
            }

            $(".menu a").each(function () {
                $(this).removeClass("active");
                if (url == (this.href)) {
                    $(this).addClass("active");
                }
            });
        });       
    });

        
})(jQuery);
/*manager*/
function hideBlock() {
    $('#changePass').hide();
    $('#updateInfo').hide();
    $('#studentList').hide();
    $('#addStudent').hide();
    $('#staffList').hide();
    $('#addStaff').hide();
    $('#competitionList').hide();
    $('#addCompetition').hide();
    $('#designOfCompetition').hide();
    
}
function displayBlock(name){
hideBlock();
document.getElementById(name).style.display="block";    
}
$('#UpdatePanel1').ready(function() {
    hideBlock(); 
});
/*Staff*/
function hideBlockStaff() { 
    $('#StaffChangePass').hide();
    $('#StaffUpdateInfo').hide();     
    $('#StaffViewStudent').hide();
    $('#StaffViewCompetition').hide();
    $('#StaffViewAllCompetition').hide();        
}  
function displayBlockStaff(name){
hideBlockStaff();
document.getElementById(name).style.display="block";    
}
$('#UpdatePanel1').ready(function() {
    hideBlockStaff();       

});
/*Student*/
function hideBlockStudent() {
    $('#StudentChangePass').hide();
    $('#StaffViewStudent').hide();
    $('#StudentUpdateInfo').hide();
    $('#StudentViewCompetition').hide();
    $('#StudentViewDesign').hide();    
}  
function displayBlockStudent(name){
hideBlockStudent();
document.getElementById(name).style.display="block";    
}
$('#UpdatePanel1').ready(function() {
    hideBlockStudent(); 
});
